Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 2 - Movie Controller Components / Movie Controller Components Reference
Movie Controller Functions / Handling Movie Events


MCSetActionFilterWithRefCon

The MCSetActionFilterWithRefCon function allows your application to establish an action filter function for a movie controller. The movie controller component calls your action filter function each time the component receives an action for its movie controller. Your filter function is then free to handle the action or to refer it back to the movie controller component. If you refer it back to the movie controller component, the component handles the action. See "Movie Controller Actions," which begins on page 2-15, for a description of the actions supported by movie controller components.

pascal ComponentResult MCSetActionFilterWithRefCon
                                    (MovieController mc,
                                     MCActionFilter filter,
                                     long refCon);
mc
Specifies the movie controller for the operation. You obtain this
identifier from the Component Manager's OpenComponent or OpenDefaultComponent function, or from the NewMovieController function (described on page 2-28).
filter
Points to your action filter function. Set this parameter to nil to remove your action filter function.
refCon
Contains a reference constant value. The movie controller component passes this reference constant to your action filter function each time it calls your function.
DESCRIPTION
Movie controller components allow your application to field movie controller actions. You define an action filter function in your application and assign it to a controller by calling the MCSetActionFilterWithRefCon function.

You can use the constants described in "Movie Controller Actions," which begins on page 2-15, to refer to movie controller actions.

If your filter function handles an action, you can handle the action in any way you desire. For example, your filter function could change the operation of movie controller buttons. More commonly, applications use the action filter function to monitor actions of the controller. For instance, your filter function might enable you to find out when the user clicks the play button, so that your application can enable appropriate menu selections. Alternatively, you can use the filter function to detect when the user resizes the movie.

SEE ALSO
If you use any Movie Toolbox functions that modify the movie in your action filter function, be sure to call the MCMovieChanged function (described on page 2-49).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help